package com.loanapp.server.market.api.bbs.hystrix;

import com.github.pagehelper.PageInfo;
import com.loanapp.server.market.api.bbs.api.CommentApi;
import com.loanapp.server.market.api.bbs.api.PostApi;
import com.loanapp.server.market.api.bbs.entity.Comment;
import com.loanapp.server.market.api.bbs.entity.Post;
import com.loanapp.server.market.api.bbs.query.PostQuery;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class CommentApiFallbackFactory implements FallbackFactory<CommentApi> {

    public CommentApi create(final Throwable throwable) {
        return new CommentApi() {
            public Long insert(Comment comment) throws Exception {
                return null;
            }

            public List<Map<String, Object>> getCommentByPid(Long pid, int[] params) throws Exception {
                return null;
            }
        };
    }
}